export default defineBackground(() => {
    console.log('Hello background!', { id: browser.runtime.id })
    //chrome.runtime.onInstalled.addListener(function () {
    chrome.contextMenus.create({
        id: '1',
        title: 'Save As Markdown'
    })
    // chrome.runtime.onMessage.addListener(function (data) {

    // })
    chrome.contextMenus.onClicked.addListener(function (info, tab) {
        chrome.tabs.query(
            { active: true, currentWindow: true },
            function (tabs) {
                if (tabs.length > 0) {
                    chrome.tabs.sendMessage(tabs[0].id, {
                        greeting: 'hello'
                    })
                }
            }
        )
    })
    //})
})
